package com.mouse.customview;

import com.ze.familyday.familyphotoframesquare.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class CustomToast {

	private static Toast toast;
	
	public static void show(Context context, String info) {
		if (toast == null) {
			toast = Toast.makeText(context, "", Toast.LENGTH_SHORT);
		}
		View view = LayoutInflater.from(context).inflate(R.layout.toast_text, null);
		TextView tvInfo = (TextView) view.findViewById(R.id.tvToast);
		tvInfo.setText(info);
		toast.setView(view);
		toast.show();
	}
	public static void show(Context context, int infoId) {
		if (toast == null) {
			toast = Toast.makeText(context, "", Toast.LENGTH_SHORT);
		}
		View view = LayoutInflater.from(context).inflate(R.layout.toast_text, null);
		TextView tvInfo = (TextView) view.findViewById(R.id.tvToast);
		tvInfo.setText(infoId);
		toast.setView(view);
		toast.show();
	}
}
